﻿using Volo.Abp.DependencyInjection;
using YAPACS.BusinessObjects.Exams;
using YAPACS.Workflows;

namespace YAPACS.RisServer.Workflows.Register;

public class SetArrived : WorkflowBase, ISetArrived, ITransientDependency
{
    protected override async Task<WorkflowOutput> InvokeCoreAsync(WorkflowInput input)
    {
        const string key = "Exams";
        if (input.ContainsKey(key) && input.GetValueOrDefault(key) is List<Exam> exams)
        {
            return await Task.FromResult(new WorkflowOutput()
            {
                Success = true
            });
        }
        return await Task.FromResult(new WorkflowOutput()
        {
            Success = false,
            Error = "未找到检查数据"
        });
    }
}
